<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>SmartCheckbox demo</title>
        <script type="text/javascript" src="lib/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="jquery.smartcheckbox.js"></script>
        <script type="text/javascript">
        //<!--
            $(document).ready(function() {
                $('.school input[type=checkbox]').smartCheckbox({
                    onCheck: {
                        2: { check: '1' },
                        3: { check: '1,2' },
                        4: { check: '1,2,3' },
                        5: { check: '1,2,3,4' }
                    },
                    onUncheck: {
                        1: { uncheck: '2,3,4,5' },
                        2: { uncheck: '3,4,5' },
                        3: { uncheck: '4,5' },
                        4: { uncheck: '5' }
                    },
                    attribute: 'value',
//                    container: 'demo1'
                });

                $('.school_cascade input[type=checkbox]').smartCheckbox({
                    cascade: true,
                    onCheck: {
                        2: { check: '1' },
                        3: { check: '2' },
                        4: { check: '3' },
                        5: { check: '4' }
                    },
                    onUncheck: {
                        1: { uncheck: '2' },
                        2: { uncheck: '3' },
                        3: { uncheck: '4' },
                        4: { uncheck: '5' }
                    },
                    attribute: 'value'
                });
            });
        //-->
        </script>
    </head>
    <body>
        <form class="school">
            Select your school level<br />
            <input type="checkbox" value="1">Elementary<br />
            <input type="checkbox" value="2">Middle<br />
            <input type="checkbox" value="3">High<br />
            <input type="checkbox" value="4">Post-secondary<br />
            <input type="checkbox" value="5">Graduate<br />
        </form>
        <br />
        <form class="school_cascade">
            Select your school level (cascade option)<br />
            <input type="checkbox" value="1">Elementary<br />
            <input type="checkbox" value="2">Middle<br />
            <input type="checkbox" value="3">High<br />
            <input type="checkbox" value="4">Post-secondary<br />
            <input type="checkbox" value="5">Graduate<br />
        </form>
    </body>
</html>
